package com.vmove.childtrain.db.dao;

import android.content.Context;
import android.text.TextUtils;

import com.j256.ormlite.dao.Dao;
import com.vmove.childtrain.db.BaseDao;
import com.vmove.childtrain.db.DatabaseHelper;
import com.vmove.childtrain.db.entity.User;

import java.sql.SQLException;
import java.util.List;

import javax.xml.parsers.FactoryConfigurationError;

/**
 * 受训用户
 */
public class UserDao extends BaseDao<User> {
    public UserDao(Context context) {
        super(context);
    }


    /**
     * 查询一个team下的所有用户
     * @param teamid
     * @return
     */
    public List<User> getTeamAllUser(int teamid){
        List<User> users=null;
        try {
            users = daoOpe.queryForEq("teamid", teamid);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return users;
    }



}
